﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using WPFDevelopers.Samples.ViewModels;

namespace WPFDevelopers.Samples
{
    /// <summary>
    /// MemberInfo.xaml 的交互逻辑
    /// </summary>
    public partial class MemberInfo : Window
    {
        MemberInfoVM memberInfoVM;
        public MemberInfo(MemberManageModelVM member)
        {
            InitializeComponent();
            CustomHandleStyleByWind.Instance.window = this;
            memberInfoVM = new MemberInfoVM(member);
            this.DataContext = memberInfoVM;


        }

        private void Grid_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.DragMove();
        }

        private void FButton_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        private void Exit_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        private void Save_Click(object sender, RoutedEventArgs e)
        {
            memberInfoVM.Save();
            this.Close();
        }
    }
}
